package 力扣;

public class 搜索旋转排序数组 {
    public static void main(String[] args) {
      int[] nums={4,5,6,7,0,1,2};
        int i = search(nums, 0);
        System.out.println(i);
    }
    public static int search(int[] nums, int target) {
        //说实话，没太理解题意
        for (int i = 0; i < nums.length; i++) {
            if (nums[i]==target){
                return i;
            }
            else
                continue;
        }
        return -1;
    }
}
